Release 10.1A: OpenEdge Development:
Progress Dynamics Administration


Upgrading existing databases with the DCU

Deployments must upgrade existing databases as well as create new ones. Modifying the DCU to upgrade your application database is not difficult. The most important part of the process is planning when to apply each upgrade. You can apply incremental schema definition files, fix programs, or load ADOs to upgrade existing databases.

Patch levels are tracked using the database sequences described in the "Database nodes" section. Even if you have not changed anything else in the schema, that sequence is incremented for each patch level. That means that each patch level includes the application of an incremental .df file.

A deployment can apply several patch levels to a database. The database node for each database specifies a minimum version that sets a lower bound on the existing databases that can be upgraded by a deployment.

The general process for adding upgrades to your customized DCU is as follows:

  1. Plan on how to properly apply your upgrades. In particular, consider when the upgrade should happen during the DCU process.
  2. Create an upgrade file for the patch level. For example, a DynSports upgrade file might look like this:
  3. <?xml version="1.0" encoding="utf-8" ?>  
    <SetupInclude> 
      <Patch PatchLevel="010002"> 
        <PatchStage Stage="Delta"> 
          <Program> 
            <FileType>df</FileType>  
            <FileName>dynsports/dfd/dynsports010002delta.df</FileName>  
            <Description>Applying DynSports 010002 Delta</Description>  
            <Rerunnable>no</Rerunnable>  
            <NewDB>no</NewDB>  
            <ExistingDB>yes</ExistingDB>  
            <UpdateMandatory>yes</UpdateMandatory>  
          </Program> 
        </PatchStage> 
        <PatchStage Stage="PreADOLoad"> 
          <Program> 
            <FileType>p</FileType>  
            <FileName>dynsports/dfd/removeinvalidlinks.p</FileName>  
            <Description>Removing invalid links</Description>  
            <Rerunnable>yes</Rerunnable>  
            <NewDB>no</NewDB>  
            <ExistingDB>yes</ExistingDB>  
            <UpdateMandatory>yes</UpdateMandatory>  
          </Program> 
        </PatchStage> 
        <PatchStage Stage="ADOLoad"> 
          <Program> 
            <FileType>ADO</FileType>  
            <FileName>dynsports/dump/armcu.ado</FileName>  
            <Description>Loading ADO for Customer table.</Description>  
            <Rerunnable>yes</Rerunnable>  
            <NewDB>no</NewDB>  
            <ExistingDB>yes</ExistingDB>  
            <UpdateMandatory>yes</UpdateMandatory>  
          </Program> 
        </PatchStage> 
      </Patch> 
    </SetupInclude> 
    

  4. Use the release versioning tools to create an ADO List upgrade file if any ADOs are being applied for the patch level.
  5. Add the patch level description to the DCU driver file. For example, a DynSports patch level description might look like this:
  6. <database> 
      <DBName>DynSports</DBName> 
      <VersionSeq>seq_dynsports_dbversion</VersionSeq> 
      <MinimumVersion>010000</MinimumVersion> 
      <ConnectParams>-1</ConnectParams> 
      <DBDir>#path_db#\dynsports\dynsports.db</DBDir> 
      <DBDump>#path_src#\#dynamics_rootname#\db\dynsports\dump</DBDump> 
      <patch PatchLevel="0" DBBuild="Yes" 
          NodeURL="dynsports/dfd/dynsportsbuild.xml"/> 
      <patch PatchLevel="010002" 
          NodeURL="dynsports/dfd/dynsports010002patch.xml"/> 
    </database> 
    

  7. Test each new patch level to see how it interacts with previous upgrades.

Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095